<?php 
include TMPL_PATH.'public/header.phtml';
?>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <a href='javascript:;' class="on"><em>广告列表</em></a><span>|</span>
        <a href="<?php echo U('adv/adv_add')?>">添加广告</a>
    </div>
</div>
<div class="pad_10">
<div class="table-list">
<form name="myform" id="myform" action="<?php echo U('adv/adv_delete')?>" method="post" >
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th width="5%" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('aids[]');"></th>
			<th  width="20%" align="left">名称</th>
			<th width="30%" align="center">图片</th>
			<th width="15%" align="left">广告位</th>
<!--			<th width="5%" align="center">排序</th>
			<th width="10%" align="center">宽×高</th>
			<th width='20%' align="center">开始时间 ～ 结束时间</th>-->
			<th align="left">管理操作</th>
		</tr>
	</thead>
<tbody>
<?php 
if(isset($advList) && $advList):
	foreach ($advList as $v):
?>
	<tr>
		<td align="center"><input type="checkbox" name="aids[]" value="<?php echo $v['id'];?>"></td>
		<td align="left"><?php echo $v['name'];?></td>
		<td align="center"><img src="<?php echo $v['content'] ?>" width="300" /></td>
		<td align="left"><?php echo $v['position_name'];?></td>
<!--		<td align="center"><?php echo $v['listorder'];?></td>
		<td align="center"><?php echo $v['width'];?> x <?php echo $v['height'];?></td>
		<td align="center"><?php echo $v['start_time'].' ～ '.$v['end_time'];?></td>-->
		<td><a href="<?php echo U('adv/adv_edit', 'aid='.$v['id']);?>" title=" <?php echo $v['name'];?>">修改</a> |  <a href='<?php echo U('adv/adv_delete', 'aid='. $v['id']);?>'	onClick="return confirm('确认要删除 『 <?php echo $v['name'];?> 』 吗？')">删除</a> 
		</td>
	</tr>
<?php 
	endforeach;
endif;
?>
	</tbody>
</table>
<div class="btn"> 
<input type="submit" class="button" name="dosubmit" value="删除"/></div>
<div id="pages"><?php echo $pageShow;?></div>
</form>
</div>
</div>
</body>
<script type="text/javascript">
<!--
function add(){
	window.top.art.dialog({id:'add',iframe:'', title:'添加广告', width:'700', height:'450'}, function(){var d = window.top.art.dialog({id:'add'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'add'}).close()});void(0);
}
function edit(id) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'编辑广告',id:'edit',iframe:'<?php echo U('adv/adv_edit');?>&aid='+id,width:'700',height:'450'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
//-->
</script>
</html>